/**
 * @file: user.
 * @intro: 用户请求数据配置.
 * @author: zzmhot.
 * @email: zzmhot@163.com.
 * @Date: 2017/5/8 15:18.
 * @Copyright(©) 2017 by zzmhot.
 *
 */

import fetch from '../common/fetch'
import {port_product} from '../common/port_uri'
import * as prefix from './host'

//商品列表
export function queryList(data) {
  return fetch({
    url: prefix.prefix + port_product.queryList,
    method: 'post',
    data
  })
}

export function detail(data) {
  return fetch({
    url: prefix.prefix + port_product.detail + "/" + data.id,
    method: 'post',
    data
  })
}

export function add(data) {
  return fetch({
    url: prefix.prefix + port_product.add,
    method: 'post',
    data
  })
}

export function edit(data) {
  return fetch({
    url: prefix.prefix + port_product.edit,
    method: 'post',
    data
  })
}

